package com.ll.wechat.user.activity;

import android.text.Editable;
import android.text.TextWatcher;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.EditText;

import com.ll.wechat.R;
import com.ll.wechat.base.activity.BaseActivity;
import com.ll.wechat.base.utils.widget.TextWatcherAdapter;
import com.ll.wechat.base.utils.widget.TextWatcherAdapter.TextWatcherListener;

/**
 * 修改昵称界面
 * 
 * @ClassName: ModifySmallNameActivity
 * @author yeliangliang
 * @date 2015-8-10 下午5:22:31
 */
public class ModifySmallNameActivity extends BaseActivity implements TextWatcherListener{
	
	private EditText edt_name ;
	private String name ="";
	@Override
	public void initView() {
		setContentView(R.layout.activity_modifys_smallname);
		getActionBar().setDisplayHomeAsUpEnabled(true);
		getActionBar().setDisplayShowHomeEnabled(false);
		setTitle("更改名字");
		edt_name = (EditText) findViewById(R.id.edt_small_name);
		
	}

	@Override
	public void initData() {
		edt_name.addTextChangedListener(new TextWatcherAdapter(edt_name, this));
		
	}
	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		switch (item.getItemId()) {
		case android.R.id.home:
			finishActivity(ModifySmallNameActivity.this);
			break;

		default:
			break;
		}
		return super.onOptionsItemSelected(item);
	}
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
//		Menu menu2 = getMenuInflater().inflate(menuRes, menu);
		return super.onCreateOptionsMenu(menu);
	}
	@Override
	public void onTextChanged(EditText view, String text) {
		//edttext改变监听
		
	}
}
